﻿using ConsoleApp1.Model;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

namespace ConsoleApp1
{
    internal class Program
    {
        static void Main(string[] args)
        {
            HostApplicationBuilder hostApplicationBuilder = Host.CreateApplicationBuilder(args);
            hostApplicationBuilder.Services.AddHostedService<MyHostedService>();
            hostApplicationBuilder.Services.AddTransient<BookToXmlTool>();
            IHost host = hostApplicationBuilder.Build();
            host.Run();
        }
    }
}
